home *** CD-ROM | disk | FTP | other *** search
- Path: etek.chalmers.se!chalmers.se!sunic!mcsun!uunet!ukma!gatech!concert!sas!mozart.unx.sas.com!jamie
- From: jamie@cdevil.unx.sas.com (James Cooper)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: SAS6.1 users: please read
- Message-ID: <Byr0Gs.1qn@unx.sas.com>
- Date: 4 Dec 92 18:53:14 GMT
- References: <92337.012542MLO@SLACVM.SLAC.STANFORD.EDU> <ByMz9y.J0H@fc.hp.com>
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Organization: SAS Institute Inc.
- Lines: 32
- Originator: jamie@cdevil.unx.sas.com
- Nntp-Posting-Host: cdevil.unx.sas.com
-
-
- In article <ByMz9y.J0H@fc.hp.com>, koren@fc.hp.com (Steve Koren) writes:
- >LORETI, Maurizio (MLO@SLACVM.SLAC.STANFORD.EDU) wrote:
- >> Is this a real error? strlen returns a size_t argument
- >> according with ANSI, and size_t (defined in <stddef.h>) is
- >
- >Maybe you're right; maybe its supposed to because size_t is unsigned int
- >even though num is signed.
- >
- >However, at the very least it is something to be aware of, because when
- >I compile this under 5.10b it does just the opposite thing with the same
- >code :-)
- >
- >I can believe the program is doing the correct thing by ANSI standards.
- >But personally, I'd expect the result of doing arithmetic on a signed
- >and unsigned int to result in a signed number.
-
- Maurizio is correct. Your code is operating according to the ANSI
- standard rules for handling mathematics on different types (unsigned vs
- signed). Therefore, this cannot be "fixed"...
-
- It is something worth noting, though. Perhaps we can add it to Appendix
- 5, "Converting from Version 5 to Version 6" in the next set of manuals
- (and update pages, when we do 'em).
-
- --
- ---------------
- Jim Cooper
- (jamie@unx.sas.com) bix: jcooper
-
- Any opinions expressed herein are mine (Mine, all mine! Ha, ha, ha!),
- and not necessarily those of my employer.
-